/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.meuevento.business.invite;

import java.io.Serializable;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

/**
 *
 * @author Fernando Arena Varella (favarella@inf.ufrgs.br)
 */
@Entity
public class Invite implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long inviteId;

    //TODO: Relacionar User com Event!!!!

    public Long getInviteId() {
        return inviteId;
    }

    public void setInviteId(Long id) {
        this.inviteId = id;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (inviteId != null ? inviteId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Invite)) {
            return false;
        }
        Invite other = (Invite) object;
        if ((this.inviteId == null && other.inviteId != null) || (this.inviteId != null && !this.inviteId.equals(other.inviteId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.meuevento.business.invite.Invite[id=" + inviteId + "]";
    }

}
